package com.shbt.idao;

import java.util.Date;
import java.util.List;
import java.util.Set;

import com.shbt.entity.TReleaseSell;

/**
 * Interface for TReleaseSellDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

public interface ITReleaseSellDAO {
	/**
	 * Perform an initial save of a previously unsaved TReleaseSell entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#persist(Object)
	 * EntityManager#persist} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * ITReleaseSellDAO.save(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            TReleaseSell entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(TReleaseSell entity);

	/**
	 * Delete a persistent TReleaseSell entity. This operation must be performed
	 * within the a database transaction context for the entity's data to be
	 * permanently deleted from the persistence store, i.e., database. This
	 * method uses the {@link javax.persistence.EntityManager#remove(Object)
	 * EntityManager#delete} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * ITReleaseSellDAO.delete(entity);
	 * EntityManagerHelper.commit();
	 * entity = null;
	 * </pre>
	 * 
	 * @param entity
	 *            TReleaseSell entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(TReleaseSell entity);

	/**
	 * Persist a previously saved TReleaseSell entity and return it or a copy of
	 * it to the sender. A copy of the TReleaseSell entity parameter is returned
	 * when the JPA persistence mechanism has not previously been tracking the
	 * updated entity. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * entity = ITReleaseSellDAO.update(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            TReleaseSell entity to update
	 * @return TReleaseSell the persisted TReleaseSell entity instance, may not
	 *         be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public TReleaseSell update(TReleaseSell entity);

	public TReleaseSell findById(Integer id);

	/**
	 * Find all TReleaseSell entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the TReleaseSell property to query
	 * @param value
	 *            the property value to match
	 * @return List<TReleaseSell> found by query
	 */
	public List<TReleaseSell> findByProperty(String propertyName, Object value);

	public List<TReleaseSell> findByReleaseSellCode(Object releaseSellCode);

	public List<TReleaseSell> findBySentAddress(Object sentAddress);

	public List<TReleaseSell> findByPaymentMode(Object paymentMode);

	public List<TReleaseSell> findByDeliverMode(Object deliverMode);

	public List<TReleaseSell> findByBrowseCount(Object browseCount);

	public List<TReleaseSell> findByCommentCount(Object commentCount);

	public List<TReleaseSell> findByBookTitle(Object bookTitle);

	public List<TReleaseSell> findByIsbn(Object isbn);

	public List<TReleaseSell> findByPrice(Object price);

	public List<TReleaseSell> findByPublish(Object publish);

	public List<TReleaseSell> findByAuthor(Object author);

	public List<TReleaseSell> findByAmount(Object amount);

	/**
	 * Find all TReleaseSell entities.
	 * 
	 * @return List<TReleaseSell> all TReleaseSell entities
	 */
	public List<TReleaseSell> findAll();
}